using System;
using System.Collections.Generic;
using wpffc.contracts.domaindata;

namespace wpffc.flashcardbox
{
    public class Refill_batch
    {
        public Refill_batch()
        {
            var fillFromCompartment1 = new Fill_batch_from_compartment();
            _process += box => fillFromCompartment1.Process(new Tuple<IFlashCardBox, int>(box, 1));
            fillFromCompartment1.Full += _ => Result(_);
            fillFromCompartment1.ContinueFilling += _ => Result(_);
        }

        private Action<IFlashCardBox> _process;
        public void Process(IFlashCardBox box)
        {
            _process(box);
        }

        public event Action<IFlashCardBox> Result;
    }
}